There is known a conventional multi-spindle head exchangeable machine tool provided with a plurality of gang heads (multi spindle heads), in which the plurality of gang heads are connected with a index table and moved on an annular rail (for example, refer JP-A-63-114807). In the multi-spindle head exchangeable machine tool, an input shaft of one of the gang heads with rotary tools is detachably mounted to an output shaft of a machining unit.
As shown in FIG. 2 of JP-A-63-114807, in the multi spindle machine tool 30, gang heads 42a to 42d serving as multi spindle heads are movably mounted on upper and lower annular rails 40a and 40b. The gang heads 42a to 42d are engaged to an index table 44 disposed above the annular rail 40a. When a rotary driving source 46 rotates the index table 44, the gang heads 42a to 42d rotates. Thus, one of the gang heads 42a to 42d faces a workpiece W loaded on a jig 90, by moving the gang heads 42a to 42d used for machining the workpiece W, in turns.
In the multi spindle machine tool 30, four gang heads 42a to 42d are moved on the annular rails 40a and 40b at the same time. Therefore, for example, in the state that one gang head 42a is in use, if the other gang heads 42b to 42d are detached from the annular rails 40a and 40b so as to perform a tooling change, the tooling change should be completed before the gang head 42a finishes its operation. Otherwise, the index table 44 is automatically rotated after the gang head 42a finishes its operation, so that the next gang head 42b moves to the position of the gang head 42a. Thus, it is difficult to detach the gang heads 42b to 42d, which are relatively heavy, in such a too short time for the tooling change. Further, if the index table 44 is stopped from rotating in order to perform the tooling change of the gang heads 42b to 42d, an operating ratio of the multi spindle machine tool 30 decreases.
Therefore, for performing the tooling change of the gang heads 42b to 42d, the gang heads 42b to 42d may be detached from the machining unit 34 by moving the annular rails 40a and 40b themselves. However, in this case, the gang heads 42b to 42d should be locked on the annular rails 40a and 40b while moving the annular rails 40a and 40b. 
In addition, the gang heads 42a to 42d are provided with a plurality of tools, so that they are heavy. Here, the weight of the gang heads 42a to 42d becomes larger as the number of the gang heads 42a to 42d increases. Therefore, when the heavy gang heads 42a to 42d are rotated at a predetermined angle, the rotation speed of the index table 44 should be lowered. As the rotation speed becomes lowered, the time taken to machine the workpiece W in the gang heads 42a to 42d increases, so that a yield is deteriorated.
Further, as shown in FIG. 4 of JP-A-63-114807, the multi spindle machine tool has a connection structure in which the gang head 42a including a plurality of rotary tools 76a to 76c is connected with a machining unit 34 provided in a main body 56.
The gang head 42a includes serration shafts 86a and 86b as input shafts for obtaining a driving power used to drive the rotary tools 76a to 76c. The machining unit 34 includes rotary shafts 64a and 64c as output shafts for outputting the driving power of a driving motor 58. The main body 56 moves along with a slide table 48 by a cylinder 52, so that the serration shafts 86a and 86b are connected to or separated from holes having groove 70a and 70c of the rotary shafts 64a and 64c. 
In the multi-spindle machine tool, the serration shafts 86a and 86b and the groove attaching holes 70a and 70c are formed with male serrations and female serrations, respectively. If the male serration and the female serration are not engaged with each other, the serration shafts 86a and 86b cannot be engaged with the groove attaching holes 70a and 70c. Disclosed in FIG. 19 is an improved connection structure as related art of the present invention (it is not prior art of the present invention).
FIG. 19 is a cross-sectional view showing the connection structure between an input shaft and an output shaft according to the related art of the present invention (it is not prior art). A connecting device 202, which is provided in a driving source so as to be connected to the input shaft 201 of the tool, includes an opening 204 formed in a housing 203 accommodating the driving source, a slider 207 movable between the output shafts of the driving source within the opening 204, and a spring 208 interposed between the slider 207 and each output shaft 206 to press the slider 207 toward the input shaft 201.
The slider 207 includes a female-spline 212 to be spline-combined with a male-spline 211 formed in an outer periphery of the output shaft 206, a sliding-surface formed in an inner periphery thereof to slide on a sliding-surface 213 formed in the outer periphery of the output shaft 206, an end portion 217 to be in contact with a stopper 216 extending upwardly from the sliding-surface 213 of the output shaft 206, and a female-spline 222 to be spline-combined with a male-spline 221 provided in an end portion of the input shaft 201.
In the case where the connecting device 202 is moved toward the input shaft 201 and the slider 207 is spline-combined with the input shaft 201 in the state that the input shaft 201 is spaced apart from the slider 207, if the male-spline 221 of the input shaft 201 is not engaged with the female-spline 222 of the slider 207, the slider 207 moves back into the opening 204 by the movement of the connecting device 202 while being resistant to the elasticity of the spring 208 in the state that the end portions of the input shaft 201 and the slider 207 are in contact with each other. Thus, an excessive force is not applied to the input shaft 201 and the output shaft 206.
In the above-mentioned connecting device 202, the spring 208 is provided in the output shaft 206 and thus rotates along with the output shaft 206. As a rotational speed of the output shaft 206 increases, the spring 208 vibrates in the opening 204, thereby making it difficult to achieve the high speed rotation of the output shaft 206. Further, it is difficult to achieve the high speed rotation of the tool.
If the male-spline 221 and the female-spline 222 are engaged and spline-combined with each other while the slider 207 goes back in the state that the male-spline 221 and the female-spline 222 are not engaged with each other, the slider 207 rapidly moves toward the input shaft 206 by the elasticity of the spring 208. Therefore, the end portion 217 of the slider 207 collides with the stopper 216 of the output shaft 206. At this time, the collision is transferred to the inside of the driving source via the output shaft 206, and may have an effect on the operation of the driving source.